<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * Class Media
 * @package App\Models
 * @mixin \Eloquent
 */
class Media extends Model
{

    public static function mediaType()
    {
        return [
            '1'=>'系统',
            '2'=>'公众号'
        ];
    }

    public function getAvatarAttribute($key)
    {
        return config('admin.upload.host') . $key."_120x120";
    }
}
